package role

type Witch struct {
	*Base
	useRevived bool
	usePoison  bool
}

func NewWitch() *Witch {
	return &Witch{
		Base:       NewBase(god),
		useRevived: false,
		usePoison:  false,
	}
}

func (w *Witch) CanRevive() bool {
	return !w.useRevived
}

func (w *Witch) CanPoison() bool {
	return !w.usePoison
}

func (w *Witch) Revive(base *Base) {
	w.useRevived = true
	base.EnableAlive()
	base.EnableSpeak()
	base.EnableVote()
}

func (w *Witch) Poison(base *Base) {
	w.usePoison = true
	base.DisableAlive()
	base.DisableSpeak()
	base.DisableVote()
}

func (w *Witch) GetRole() int {
	return WitchID
}

func (w *Witch) String() string {
	return "女巫"
}
